<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Calc extends Controller {

	public function action_index()
	{
		$view = View::factory('index');
	
		$calc = Model::factory('calc');
		
		//Если вошли, то отдаем калькулятор, если нет - страницу входа
		if (!$calc->isEnter())
		$view->content = View::factory('form')->render();
		else 
		$view->content = View::factory('calc')->render();
		
		$this->response->body($view);
		
		
	}

}
